package com.ly.heart.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ly.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 销售报价单对象 erp_sale_quotation
 *
 * @author wutao
 * @date 2024-06-27
 */
@TableName("erp_sale_quotation")
@ApiModel(value = "erp_sale_quotation对象", description = "销售报价单")
@Data
public class SaleQuotationEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 报价单id
     */
    @TableId(type = IdType.INPUT)
    private String id;

    /**
     * 销售报价单编号
     */
    @ApiModelProperty("销售报价单编号")
    @TableField("sale_quotation_code")
    @Excel(name = "销售报价单编号")
    private String saleQuotationCode;

    /**
     * 单据类型dialog
     */
    @ApiModelProperty("单据类型dialog")
    @TableField("king_doc_type_id")
    @Excel(name = "单据类型dialog")
    private String kingDocTypeId;

    /**
     * 单据编码
     */
    @ApiModelProperty("单据编码")
    @TableField("king_doc_code")
    @Excel(name = "单据编码")
    private String kingDocCode;

    /**
     * 销售部门dialog
     */
    @ApiModelProperty("销售部门dialog")
    @TableField("sale_dept")
    @Excel(name = "销售部门dialog")
    private String saleDept;

    /**
     * 销售组
     */
    @ApiModelProperty("销售组")
    @TableField("sale_group")
    @Excel(name = "销售组")
    private String saleGroup;

    /**
     * 销售员
     */
    @ApiModelProperty("销售员")
    @TableField("sale_id")
    @Excel(name = "销售员")
    private String saleId;

    /**
     * 日期
     */
    @ApiModelProperty("日期")
    @TableField("sale_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date saleDate;

    /**
     * 客户dialog
     */
    @ApiModelProperty("客户dialog")
    @TableField("customer_id")
    @Excel(name = "客户dialog")
    private String customerId;

    /**
     * 客户地点
     */
    @ApiModelProperty("客户地点")
    @TableField("customer_address")
    @Excel(name = "客户地点")
    private String customerAddress;

    /**
     * 是否含税(0否1是)
     */
    @ApiModelProperty("是否含税(0否1是)")
    @TableField("is_tax")
    @Excel(name = "是否含税(0否1是)")
    private String isTax;

    /**
     * 是否价格税(0否1是)
     */
    @ApiModelProperty("是否价格税(0否1是)")
    @TableField("price_tax")
    @Excel(name = "是否价格税(0否1是)")
    private String priceTax;

    /**
     * 生效日
     */
    @ApiModelProperty("生效日")
    @TableField("effective_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生效日", width = 30, dateFormat = "yyyy-MM-dd")
    private Date effectiveDate;

    /**
     * 失效日
     */
    @ApiModelProperty("失效日")
    @TableField("expiration_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "失效日", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;



    /**
     * 币别dialog
     */
    @ApiModelProperty("币别dialog")
    @TableField("currency")
    @Excel(name = "币别dialog")
    private String currency;

    /**
     * 收款条件dialog
     */
    @ApiModelProperty("收款条件dialog")
    @TableField("payment_terms")
    @Excel(name = "收款条件dialog")
    private String paymentTerms;

    /**
     * 结算方式dialog
     */
    @ApiModelProperty("结算方式dialog")
    @TableField("settlement_type")
    @Excel(name = "结算方式dialog")
    private String settlementType;

    /**
     * 价目表dialog
     */
    @ApiModelProperty("价目表dialog")
    @TableField("priceInfo_id")
    @Excel(name = "价目表dialog")
    private String priceinfoId;

    /**
     * 折扣表dialog
     */
    @ApiModelProperty("折扣表dialog")
    @TableField("discount_info_id")
    @Excel(name = "折扣表dialog")
    private String discountInfoId;

    /**
     * 折扣表dialog
     */
    @ApiModelProperty("本位币")
    @TableField("base_currency")
    @Excel(name = "本位币")
    private String baseCurrency;

    /**
     * 汇率类型dialog
     */
    @ApiModelProperty("汇率类型dialog")
    @TableField("rate_type")
    @Excel(name = "汇率类型dialog")
    private String rateType;


    /**
     * 结算方(客户列表)
     */
    @ApiModelProperty("结算方(客户列表)")
    @TableField("settlement_party")
    @Excel(name = "结算方(客户列表)")
    private String settlementParty;


    /**
     * 流程实例id
     */
    @ApiModelProperty("流程实例id")
    @TableField("instance_id")
    @Excel(name = "流程实例id")
    private String instanceId;

    /**
     * 审核状态
     */
    @ApiModelProperty("审核状态")
    @TableField("state")
    @Excel(name = "审核状态")
    private String state;

    @ApiModelProperty("是否引用1是2否")
    @TableField("is_quote")
    @Excel(name = "是否引用1是2否")
    private String isQuote;

    /**
     * 所属公司
     */
    @ApiModelProperty("所属公司")
    @TableField("dept_id")
    @Excel(name = "所属公司")
    private String deptId;

    @ApiModelProperty("报价单物料明细")
    @TableField(exist = false)
    private List<MaterialDetailEntity> materialDetailEntities;


    @ApiModelProperty("业务type")
    @TableField (exist = false)
    private String businessType;

    @ApiModelProperty("流程模型id")
    @TableField (exist = false)
    private String modelId;


    @TableField ("is_used")
    @TableLogic
    private Integer isUsed;

}
